package com.example.financechain.controller;


import com.example.financechain.Utils.JsonData;
import com.example.financechain.domain.DTO.TransferDTO;
import com.example.financechain.domain.entity.Transfer;
import com.example.financechain.service.ITransferService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yy
 * @since 2023-04-23
 */
@RestController
@RequestMapping("private/transfer")
public class TransferController {

    @Autowired
     private  ITransferService iTransferService;
    /**
     * 发起转账
     * @return
     */
    @PostMapping("")
    public JsonData transfer(@RequestBody TransferDTO transferDTO){

      return   iTransferService.transferfinance(transferDTO);

    }

}
